Optimal. Leaf size=79 \[ \frac{a^2 (e x)^n}{e n}+\frac{2 a b x^{-n} (e x)^n \tan ^{-1}\left (\sinh \left (c+d x^n\right )\right )}{d e n}+\frac{b^2 x^{-n} (e x)^n \tanh \left (c+d x^n\right )}{d e n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.102068, antiderivative size = 79, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {5440, 5436, 3773, 3770, 3767, 8} \[ \frac{a^2 (e x)^n}{e n}+\frac{2 a b x^{-n} (e x)^n \tan ^{-1}\left (\sinh \left (c+d x^n\right )\right )}{d e n}+\frac{b^2 x^{-n} (e x)^n \tanh \left (c+d x^n\right )}{d e n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5440
Rule 5436
Rule 3773
Rule 3770
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int (e x)^{-1+n} \left (a+b \text{sech}\left (c+d x^n\right )\right )^2 \, dx &=\frac{\left (x^{-n} (e x)^n\right ) \int x^{-1+n} \left (a+b \text{sech}\left (c+d x^n\right )\right )^2 \, dx}{e}\\ &=\frac{\left (x^{-n} (e x)^n\right ) \operatorname{Subst}\left (\int (a+b \text{sech}(c+d x))^2 \, dx,x,x^n\right )}{e n}\\ &=\frac{a^2 (e x)^n}{e n}+\frac{\left (2 a b x^{-n} (e x)^n\right ) \operatorname{Subst}\left (\int \text{sech}(c+d x) \, dx,x,x^n\right )}{e n}+\frac{\left (b^2 x^{-n} (e x)^n\right ) \operatorname{Subst}\left (\int \text{sech}^2(c+d x) \, dx,x,x^n\right )}{e n}\\ &=\frac{a^2 (e x)^n}{e n}+\frac{2 a b x^{-n} (e x)^n \tan ^{-1}\left (\sinh \left (c+d x^n\right )\right )}{d e n}+\frac{\left (i b^2 x^{-n} (e x)^n\right ) \operatorname{Subst}\left (\int 1 \, dx,x,-i \tanh \left (c+d x^n\right )\right )}{d e n}\\ &=\frac{a^2 (e x)^n}{e n}+\frac{2 a b x^{-n} (e x)^n \tan ^{-1}\left (\sinh \left (c+d x^n\right )\right )}{d e n}+\frac{b^2 x^{-n} (e x)^n \tanh \left (c+d x^n\right )}{d e n}\\ \end{align*}
Mathematica [A] time = 0.201293, size = 57, normalized size = 0.72 \[ \frac{x^{-n} (e x)^n \left (a \left (a \left (c+d x^n\right )+2 b \tan ^{-1}\left (\sinh \left (c+d x^n\right )\right )\right )+b^2 \tanh \left (c+d x^n\right )\right )}{d e n} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.112, size = 271, normalized size = 3.4 \begin{align*}{\frac{{a}^{2}x}{n}{{\rm e}^{-{\frac{ \left ( -1+n \right ) \left ( i{\it csgn} \left ( ie \right ){\it csgn} \left ( ix \right ){\it csgn} \left ( iex \right ) \pi -i{\it csgn} \left ( ie \right ) \left ({\it csgn} \left ( iex \right ) \right ) ^{2}\pi -i{\it csgn} \left ( ix \right ) \left ({\it csgn} \left ( iex \right ) \right ) ^{2}\pi +i \left ({\it csgn} \left ( iex \right ) \right ) ^{3}\pi -2\,\ln \left ( e \right ) -2\,\ln \left ( x \right ) \right ) }{2}}}}}-2\,{\frac{x{b}^{2}{{\rm e}^{-1/2\, \left ( -1+n \right ) \left ( i{\it csgn} \left ( ie \right ){\it csgn} \left ( ix \right ){\it csgn} \left ( iex \right ) \pi -i{\it csgn} \left ( ie \right ) \left ({\it csgn} \left ( iex \right ) \right ) ^{2}\pi -i{\it csgn} \left ( ix \right ) \left ({\it csgn} \left ( iex \right ) \right ) ^{2}\pi +i \left ({\it csgn} \left ( iex \right ) \right ) ^{3}\pi -2\,\ln \left ( e \right ) -2\,\ln \left ( x \right ) \right ) }}}{d{x}^{n}n \left ( 1+{{\rm e}^{2\,c+2\,d{x}^{n}}} \right ) }}+4\,{\frac{ba{e}^{n}\arctan \left ({{\rm e}^{c+d{x}^{n}}} \right ){{\rm e}^{-i/2\pi \,{\it csgn} \left ( iex \right ) \left ( -1+n \right ) \left ( -{\it csgn} \left ( iex \right ) +{\it csgn} \left ( ix \right ) \right ) \left ( -{\it csgn} \left ( iex \right ) +{\it csgn} \left ( ie \right ) \right ) }}}{ned}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.5153, size = 2187, normalized size = 27.68 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \operatorname{sech}\left (d x^{n} + c\right ) + a\right )}^{2} \left (e x\right )^{n - 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]